package tpoo.common.utils.passiveOperations;

import tpoo.common.dto.model.users.UserDTO;

public class NewContact extends PassiveOperation{

	private static final long serialVersionUID = 888488546808289565L;
	private UserDTO contact;
	
	public NewContact(UserDTO contact) {
		this.contact = contact;
		this.addParameter(contact);
	}
	
	@Override
	public void execute() throws Exception {
		this.getLoggedUser().addContact(contact);
		getLogger().debug("Agregando el contacto "+this.getContact());
	}

	public void setContact(UserDTO contact) {
		this.contact = contact;
	}

	public UserDTO getContact() {
		return contact;
	}

}
